<script type="text/javascript">
$(document).ready(function(){
	$("#add").on("click",function(){
		var name =  $("input[name='name']").val();
		var grade = $("input[name='grade']").val();
		var code = $("input[name='code']").val();
		var status = $('input:radio[name="status"]:checked').val();
		var introduction = $("textarea[name='introduction']").val();
		$.post("${path}/role/addRole",{
			name:name,
			grade:grade,
			status:status,
			code:code,
			introduction:introduction
			}
		,function(data){
			if(data.success){
				window.location.href="${path}/role/list";
			}
		}); 
	})
});
</script>
<div>
	角色名称：<input name= "name"><br/>
	角色等级：<input name= "grade"><br/>
	角色代码：<input name= "code"><br/>
	角色状态：<input id="z1" type="radio" value="0" name="status" checked/>正常启用
		 	  <input id="z2" type="radio" value="1" name="status"/>异常  <br/>
	描述：<textarea name="introduction"></textarea>
	<button id="add">添加</button>
</div>